<!--  -->
<template>
  <div class="computed-id">
    <c-title :hide="false" :text="`${form.name ? form.name: '算力'}抵扣权益`"></c-title>
      <div class="equity-box">
        <div class="equity-content" v-if="form.ai_create_status">
          <div class="equity-list" @click="goPage('aiCreatePerSpace')">
            <span class="list-name">AI创作</span>
            <i class="iconfont icon-icon_more11 list-op"></i>
          </div>
        </div>
        <div class="equity-content" v-if="form.ai_create_status && form.video_create">
          <div class="equity-list">
            <span class="list-name">视频创作</span>
            <span class="list-op">{{form.video_create}}/1分钟</span>
          </div>
        </div>
        <div class="equity-content" v-if="form.ai_create_status && form.voice_clone">
          <div class="equity-list">
            <span class="list-name">声音克隆</span>
            <span class="list-op">{{form.voice_clone}}/1次</span>
          </div>
        </div>
        <div class="equity-content" v-if="form.ai_create_status && form.number_avatar">
          <div class="equity-list">
            <span class="list-name">数字分身</span>
            <span class="list-op">{{form.number_avatar}}/1次</span>
          </div>
        </div>
        <div class="equity-content" v-if="form.ai_create_status && form.voice_clone_cv">
          <div class="equity-list">
            <span class="list-name">声音克隆CV版</span>
            <span class="list-op">{{form.voice_clone_cv}}/1次</span>
          </div>
        </div>
        <!-- <div class="equity-content">
          <div class="equity-list" @click="goPage('materialCenter')">
            <span class="list-name">AI素材库</span>
            <i class="iconfont icon-icon_more11 list-op"></i>
          </div>
        </div> -->
        <!-- <div class="equity-content">
          <div class="equity-list">
            <span class="list-name">时长拆条</span>
            <span class="list-op">1000.0000/1次</span>
          </div>
        </div> -->
      </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {}
    };
  },

  created() {},
  components: {  },

  computed: {},

  mounted() {
    if (!this.$route.query.api) {
      return this.$toast("缺少必要参数");
    }
    this.getData();
  },

  methods: {
    goPage(url) {
      this.$router.push(this.fun.getUrl(url, {}, {}));
    },
    async getData() {
      let data = await $http.post(this.$route.query.api, { });
      console.log(data,'datadata');
      if (data.result) {
        this.form = data.data;
        this.fun.setWXTitle(`${this.form.name ? this.form.name: '算力'}抵扣权益`)
      } else {
        this.$toast(data.msg);
      }
    },
  }
};
</script>
<style lang="scss" rel="stylesheet/scss" scoped>
.equity-box {
  padding: 1.625rem 0 ;
  background: #ffffff;
  .equity-top {
    font-weight: bold;
    font-size: 1.0625rem;
    color: #00001c;
    line-height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0.75rem 0 1.78125rem 0;
    .equity-desc {
    }
    .icon-close11 {
      font-size: 1.0625rem;
      position: absolute;
      right: 1.09375rem;
      color: #aaaab3;
      top: 0.2rem;
    }
  }
  .equity-content:last-child {
    margin-bottom: 0 !important;
  }
  .equity-content {
    margin-bottom: 1.40625rem;
    .equity-list {
      display: flex;
      justify-content: space-between;
      padding: 0 0.9375rem;
      .list-name {
        font-weight: 500;
        font-size: 0.875rem;
        color: #00001c;
      }
      .list-op {
        font-size: 0.875rem;
        color: #aaaab3;
      }
    }
  }
}

</style>
